package com.blvtphan.tipocketclubs.database;

import android.content.Context;

public class DatabaseManager {

	private DatabaseHelper mDbHelper;
	private MyAccountTableHelper instanceMyAccountHelper;

	private static DatabaseManager instance = null;
	private static Context mContext = null;

	public static synchronized DatabaseManager getInstance(Context context) {
		if (instance == null) {
			instance = new DatabaseManager(context);
			mContext = context;
		}
		// mContext = context;
		return instance;
	}

	private DatabaseManager(Context context) {
		this.mDbHelper = new DatabaseHelper(context);
	}

	/**
	 * Instance for MyAccountTableHelper
	 * 
	 * @return
	 */
	public MyAccountTableHelper getMyAccountHelper() {
		if (instanceMyAccountHelper == null) {
			instanceMyAccountHelper = new MyAccountTableHelper(mDbHelper);
		}
		return instanceMyAccountHelper;
	}
}
